#include "LightStage.h"

namespace egg{

    LightStage::LightStage(){
        mQuad=gGeometryLib.getGeometry("quad");
        mShader=gShaderLib.getShader("light");
        mParamMap.bindShader(mShader);
        mParamMap.bindNumericParam("uni_vec4_frustum");
        mParamMap.bindTextureParam("uni_sampler2D_gPosition");
        mParamMap.bindTextureParam("uni_sampler2D_gNormal");
        mParamMap.bindTextureParam("uni_sampler2D_gColor");
        mParamMap.bindTextureParam("uni_sampler2D_gExt");
    }

    void LightStage::doRender(const FrameEvent& evt){
        mParamMap._commitParamsForce();
        mQuad->draw();
    }

}